ARCH            ?= arm
CROSS_COMPILE   ?= /opt/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-

export ARCH
export CROSS_COMPILE
# -m表示编译成模块
obj-m += hello.o

KDIR:=/home/wj/study/qemu/linux-xlnx
# KDIR:=/lib/modules/$(shell uname -r)/build
# KDIR:=/lib/modules/6.8.0-40-generic/build
PWD?=$(shell pwd)
all:
	make -C $(KDIR) M=$(PWD) modules	#make modules 使用来编译成内核模块的
	echo $(PWD)

clean:
	rm -f *.ko *.o *.mod.o *.mod.c *.symvers *.order *.cmd *.mod .*
